package edu.lingnan.rili.utils;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

/**
 * 这是一个通过application.yml将数据注入到属性上的类
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@Component
@PropertySource(value = "classpath:config/beans.properties", encoding = "UTF-8")//解决中文乱码的问题
@ConfigurationProperties(prefix = "preread")
public class ConfigurationData {
    private static String uploadPath;
    private static String visitPath;

    public static String getUploadPath() {
        return uploadPath;
    }

    public void setUploadPath(String uploadPath) {
        this.uploadPath = uploadPath;
    }

    public static String getVisitPath() {
        return visitPath;
    }

    public void setVisitPath(String visitPath) {
        this.visitPath = visitPath;
    }
}
